﻿using System.ComponentModel.Composition;
using System.IO;
using Microsoft.Practices.Prism.Events;



namespace ScriptEase.Shell.Events
{
    /// <summary>
    /// An item that is controlled by ScriptEase has changed.
    /// </summary>
    [Export]
    public class ControlledItemChangedEvent : CompositePresentationEvent<ControlledItemChangedEventArgs>
    {
    }
    
    [Export]
    public class ControlledItemChangedEventArgs 
    {
        public string WebResourceName { get; private set; }
        public string FileName { get; private set; }
        public bool Enabled { get; private set; }
        public FileSyncStatus Status { get; private set; }
        public FileInfo FileInfo { get; private set; }
        public string DirectoryName { get; private set; }
        public bool? WebResourceIsManaged { get; private set; }


        public ControlledItemChangedEventArgs(string webResourceName, bool enabled, string fileName, FileSyncStatus status, FileInfo fileInfo, string directoryName, bool? webResourceIsManaged)
        {
            this.WebResourceName = webResourceName;
            this.FileName = fileName;
            this.Enabled = enabled;
            this.Status = status;
            this.FileInfo = fileInfo;
            this.DirectoryName = directoryName;
            this.WebResourceIsManaged = webResourceIsManaged;
        }
        
        public ControlledItemChangedEventArgs(string webResourceName, bool enabled)
        {
            this.WebResourceName = webResourceName;
            this.Enabled = enabled;
        }
    }

   
}